firmware_class: Return specific errors from file read
authorBen Hutchings <ben@decadent.org.uk>
Sat, 14 Dec 2013 17:14:39 +0000 (17:14 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 17 Mar 2016 01:25:23 +0000 (01:25 +0000)
commitaa4ffaac6efa62d37a96b9acb6d2f07821858643
tree7a86f530e34b639eeb0782cca2c23b7b153bc64a
parent28ad2f8da601b41511e9ff047c0fe16c9c2e6b82
firmware_class: Return specific errors from file read

Currently several failure cases are not distinguished and are
incorrectly reported as -EINVAL or -ENOENT.

Change fw_file_size() to return an error code on failure and
adjust fw_read_file_contents() and fw_get_filesystem_firmware()

Change _request_firmware() to return the error code from
fw_get_filesystem_firmware() if CONFIG_FW_LOADER_USER_HELPER is not
enabled.  (If it is enabled and also fails, unfortunately we can't
tell why.)

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name firmware_class-return-specific-errors-from-file-read.patch
drivers/base/firmware_class.c